﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace MvcToolbox
{
    /// <summary>
    /// Class GridColumn
    /// </summary>
    /// <typeparam name="TModel">The type of the T model.</typeparam>
    /// <typeparam name="T">Type of parameter</typeparam>
    public class GridColumn<TModel, T>
    {
        /// <summary>
        /// Gets or sets a value indicating whether this instance is hide.
        /// </summary>
        /// <value><c>true</c> if this instance is hide; otherwise, <c>false</c>.</value>
        public virtual bool IsHide { get; set; }

        /// <summary>
        /// Gets or sets the template.
        /// </summary>
        /// <value>The template.</value>
        public virtual string Template { get; set; }

        /// <summary>
        /// Gets or sets the width.
        /// </summary>
        /// <value>The width.</value>
        public virtual int Width { get; set; }

        /// <summary>
        /// Gets or sets the format.
        /// </summary>
        /// <value>The format.</value>
        public virtual string Format { get; set; }


        /// <summary>
        /// Gets or sets a value indicating whether [no order].
        /// </summary>
        /// <value><c>true</c> if [no order]; otherwise, <c>false</c>.</value>
        public bool NoOrder { get; set; }

        /// <summary>
        /// Gets the header.
        /// </summary>
        /// <value>The header.</value>
        public virtual string Header
        {
            get 
            { 
                return string.Empty; 
            }
        }

        /// <summary>
        /// Gets the name of the property.
        /// </summary>
        /// <value>The name of the property.</value>
        public virtual string PropertyName
        {
            get 
            {
                return string.Empty; 
            }
        }

        /// <summary>
        /// Renders the specified control.
        /// </summary>
        /// <param name="control">The control.</param>
        /// <param name="html">The HTML.</param>
        /// <param name="prop">The prop.</param>
        /// <exception cref="System.NotImplementedException">Not Implemented Exception</exception>
        public virtual void Render(StringBuilder control, HtmlHelper<TModel> html, ModelMetadata prop, ModelMetadata viewData)
        {
        }
    }
}
